<?php

hc_core_ClassLoader::load('halo_IViewHelperMappingFactory');

class halo_SimpleViewHelperMappingFactory implements halo_IViewHelperMappingFactory {
    private $viewHelperMappingClassName;
    private $config;
    public function __construct($viewHelperMappingClassName, $config = null) {
        $this->viewHelperMappingClassName = $viewHelperMappingClassName;
        $this->config = $config;
    }
    public function createViewHelperMapping(halo_HttpRequest $httpRequest, halo_HttpResponse $httpResponse) {
        $viewHelperMappingClassName = $this->viewHelperMappingClassName;
        hc_core_ClassLoader::load($viewHelperMappingClassName);
        $viewHelperMapping = new $viewHelperMappingClassName($httpRequest, $httpResponse);
        $viewHelperMapping->configureViewHelperMapping($this->config);
        return $viewHelperMapping;
    }
}

?>
